import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'
import { CustomValidPip } from './pip/custom-valid-pip'
import { NestExpressApplication } from '@nestjs/platform-express'

async function bootstrap() {
   const app = await NestFactory.create<NestExpressApplication>(AppModule)
   app.useStaticAssets('uploads', { prefix: '/uploads' })
   app.useGlobalPipes(new CustomValidPip())
   app.setGlobalPrefix('api')
   await app.listen(3000)
   console.log('http://localhost:3000')
}
bootstrap()
